﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
namespace DAL
{
    public class sp_consigneeDAL
    {
        MyShoppingDB_VueEntities context = new MyShoppingDB_VueEntities();

        //查询全部
        public List<sp_consignee> getall()
        {
            return context.Set<sp_consignee>().ToList();
        }
        //添加
        public int addconsi(sp_consignee s)
        {
            context.Set<sp_consignee>().Add(s);
            return context.SaveChanges();
        }

        public int delconsi(int id)
        {
            sp_consignee f = context.Set<sp_consignee>().Find(id);
            context.Set<sp_consignee>().Remove(f);
            return context.SaveChanges();
        }
    }
}
